package com.six.vo;

import java.sql.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 盘点报告
 * 
 */
@Entity
@Table(name="WMS_T_CHECKREPORT")
public class CheckReport {
	private int chkrptID;// VARCHAR(16) 报告编号
	private Date chkrptDate;// DATE 报告时间
	private String chkrptNote;// NVARCHAR2(512) 备注
	private Date chkrptEditTime;// DATE 最后编辑时间
	private int chkrptIsDel;// SMALLINT 是否已被删除
	private Customer customer;
	private Set<CheckReportDetail> checkReportDetail;
	
	public CheckReport() {
		super();
	}
	public CheckReport(int chkrptID, Date chkrptDate, String chkrptNote,
			Date chkrptEditTime, int chkrptIsDel, Customer customer,
			Set<CheckReportDetail> checkReportDetail) {
		super();
		this.chkrptID = chkrptID;
		this.chkrptDate = chkrptDate;
		this.chkrptNote = chkrptNote;
		this.chkrptEditTime = chkrptEditTime;
		this.chkrptIsDel = chkrptIsDel;
		this.customer = customer;
		this.checkReportDetail = checkReportDetail;
	}
	@Id
	@GeneratedValue
	public int getChkrptID() {
		return chkrptID;
	}
	public void setChkrptID(int chkrptID) {
		this.chkrptID = chkrptID;
	}
	public Date getChkrptDate() {
		return chkrptDate;
	}
	public void setChkrptDate(Date chkrptDate) {
		this.chkrptDate = chkrptDate;
	}
	public String getChkrptNote() {
		return chkrptNote;
	}
	public void setChkrptNote(String chkrptNote) {
		this.chkrptNote = chkrptNote;
	}
	public Date getChkrptEditTime() {
		return chkrptEditTime;
	}
	public void setChkrptEditTime(Date chkrptEditTime) {
		this.chkrptEditTime = chkrptEditTime;
	}
	public int getChkrptIsDel() {
		return chkrptIsDel;
	}
	public void setChkrptIsDel(int chkrptIsDel) {
		this.chkrptIsDel = chkrptIsDel;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="custID") 	 // VARCHAR(16) 货主编号
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	@OneToMany(cascade=CascadeType.ALL)
	public Set<CheckReportDetail> getCheckReportDetail() {
		return checkReportDetail;
	}
	public void setCheckReportDetail(Set<CheckReportDetail> checkReportDetail) {
		this.checkReportDetail = checkReportDetail;
	}
	

}
